﻿#pragma once

#include "TownArcher.h"
#include "../ConquestObject.h"
#include "../../MirDatabase/MonsterInfo.h"
#include "../MonsterObject.h"
#include "../PlayerObject.h"
#include "../../../Shared/Enums.h"
#include <cmath>

using namespace Server::MirDatabase;
using namespace Server::MirEnvir;
namespace S = ServerPackets;

namespace Server::MirObjects::Monsters
{
    class ConquestArcher : public TownArcher
    {
    public:
        ConquestObject *Conquest;
        int ArcherIndex = 0;

        virtual ~ConquestArcher()
        {
            delete Conquest;
        }

    protected:
        bool getCanMove() const override;

        ConquestArcher(MonsterInfo *info);

    public:
        bool IsAttackTarget(MonsterObject *attacker) override;

        void Die() override;

    protected:
        void FindTarget() override;

    public:
        int Attacked(PlayerObject *attacker, int damage, DefenceType type = DefenceType::ACAgility, bool damageWeapon = true) override;
        int Attacked(MonsterObject *attacker, int damage, DefenceType type = DefenceType::ACAgility) override;
    };
}
